<template>
  <a-modal
      :close-on-click-modal="false"
      :open="api.detailState.visible"
      :title="api.detailState.title"
      destroy-on-close
      @cancel="api.onCloseDetail()"
      @ok="api.onCloseDetail()"
      width="900px"
  >

    <a-descriptions :column="1" bordered>
      <a-descriptions-item label="公司名称">{{ api.detailState.form.name }}</a-descriptions-item>
      <a-descriptions-item label="公司LOGO图片">{{ api.detailState.form.logo }}</a-descriptions-item>
      <a-descriptions-item label="公司LOGO名称">{{ api.detailState.form.title }}</a-descriptions-item>
      <a-descriptions-item label="微信原始ID">{{ api.detailState.form.weixinSign }}</a-descriptions-item>
      <a-descriptions-item label="主体名称">{{ api.detailState.form.principalName }}</a-descriptions-item>
      <a-descriptions-item label="小程序名称">{{ api.detailState.form.appletName }}</a-descriptions-item>
      <a-descriptions-item label="小程序码">{{ api.detailState.form.appletImg }}</a-descriptions-item>
      <a-descriptions-item label="小程序appid">{{ api.detailState.form.appletAppid }}</a-descriptions-item>
      <a-descriptions-item label="小程序秘钥">{{ api.detailState.form.appletSecret }}</a-descriptions-item>
      <a-descriptions-item label="商户号">{{ api.detailState.form.mchId }}</a-descriptions-item>
      <a-descriptions-item label="APIv2密钥">{{ api.detailState.form.mchKey }}</a-descriptions-item>
      <a-descriptions-item label="API证书">{{ api.detailState.form.keyPath }}</a-descriptions-item>
      <a-descriptions-item label="公众号appid">{{ api.detailState.form.generalAppid }}</a-descriptions-item>
      <a-descriptions-item label="公众号秘钥">{{ api.detailState.form.generalSecret }}</a-descriptions-item>
      <a-descriptions-item label="认证的token">{{ api.detailState.form.generalToken }}</a-descriptions-item>
      <a-descriptions-item label="认证的token秘钥">{{ api.detailState.form.generalAesKey }}</a-descriptions-item>
    </a-descriptions>
  </a-modal>
</template>

<script setup lang="ts">
import {CompanyApi} from "~/api/system/company.api";

interface Props {
  api: CompanyApi;
}

const { api } = withDefaults(defineProps<Props>(), {});

</script>

<style scoped lang="scss">

</style>
